<?php
/**
 * Created by PhpStorm.
 * User: DELL-PC
 * Date: 2018/8/2
 * Time: 9:50
 */

namespace J\Schema;


use J\Schema\Collection\Element\ElementManager;
use J\Schema\Collection\Option;
use J\Exception;
use J\ReadOnly;

interface ICollection
{
    public function getName();

    public function getLabel();

    public function getKey();

    /**
     * @return string | false
     */
    public function getTreeKey();

    /**
     * @return bool
     *
     */
    public function isTree();

    /**
     * @return ReadOnly
     */
    public function getAttribute();

    /**
     * 增，删，改，查
     *
     * @return ICurd
     */
    public function getCurd();

    /**
     * 获取Where语句组装器
     *
     * @return IWhere
     */
    // public function getWhere();

    /**
     * 获取查询附加信息组装器
     *
     * @return Option
     */
    // public function getOption();

    /**
     * 获取元素遍历器
     * @return ElementManager
     * @throws Exception
     */
    public function elements();

    /**
     * 获取关联集合
     *
     * @param string $name
     * @return ICollection
     * @throws Exception;
     */
    public function getLinker($name);
}